package fun.sanguo.model.enums;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用户登陆响应枚举类
 *
 * @author ZYP
 * @date 2023-06-09
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum UserLoginEnums {

    /**
     * 登陆成功
     */
    SUCCESS("0", "登陆成功"),

    /**
     * 登陆失败
     */
    CAPTCHA_EXPIRED("101", "验证码过期"),
    CAPTCHA_INCORRECT("102", "验证码错误"),
    USER_NOTFOUND("201", "账号不存在"),
    USER_DELETED("202", "账号已注销"),
    PASSWORD_DEFAULTED("0", "初始化密码，请及时修改"),
    PASSWORD_INCORRECT("302", "密码不正确");

    /**
     * 响应代码
     */
    private String code;

    /**
     * 响应内容
     */
    private String msg;

    UserLoginEnums(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
